home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG PD-ROM BV3
/
BMUG PD-ROM Version BV3 (CDRM1097900).iso
/
Programming
/
Programming Languages
/
Harvest C
/
Examples
/
Sample1.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-09
|
472b
|
33 lines
/* Very simple program , with floating point */
/*
This program is simple, but it demonstrates the following :
1. integer and floating point arithmetic
2. global data initialization
3. inclusion of standard header files
4. call of a Toolbox trap
*/
#include <osutils.h>
#include <types.h>
double x = 100;
double ss;
char y;
int main()
{
int p;
int j;
ss = 3.14;
x = x * 3.14;
j = x / ss;
j /= 25;
y=j;
while (y--)
SysBeep(1);
return j;
}